#pragma once

class CVector4
{
public:
	CVector4(void);
	CVector4(DATA_TYPE x_, DATA_TYPE y_, DATA_TYPE z_, DATA_TYPE w_);
	virtual ~CVector4(void);

	DATA_TYPE& operator[](unsigned int idx);
	DATA_TYPE operator[] (unsigned int idx) const;

	CVector4 operator-() const;
	CVector4 operator+(const CVector4& rhs) const;
	CVector4 operator-(const CVector4& rhs) const;
	CVector4 operator*(const CVector4& rhs) const;
	CVector4 operator*(DATA_TYPE fScalar) const;
	CVector4 operator/(DATA_TYPE fScalar) const;

	DATA_TYPE Dot(const CVector4& rhs) const;
	CVector4 Cross3(const CVector4& rhs) const;

	CVector4 Normalize() const;
	DATA_TYPE GetLength() const;

	DATA_TYPE x, y, z, w;

	static CVector4 Interpolate(DATA_TYPE a, DATA_TYPE b, DATA_TYPE c, 
						 const CVector4& vec0, const CVector4& vec1, const CVector4& vec2);
	static CVector4 Interpolate(DATA_TYPE a, const CVector4& vec0, const CVector4& vec1);
	static DATA_TYPE GetDistance(const CVector4& vec0, const CVector4& vec1);
};

